
	 <div class="text-right padd-b">
	 	<a href="http://localhost:8080/RDCNEW/admin/control/add/id_cate/<?php echo $this->id_cate?>" class="btn btn-primary btn-sm" active" role="button"><span class="glyphicon glyphicon-pencil ">&nbsp;</span>Thêm Bài Viết</a>
	 </div>  

             <table class="table table-hover">
                            <thead>  
                              <tr class="success">  
                                <th>#</th>  
                                <th>Tên bài viết</th>  
                                <th>Ngày đăng</th>  
                                 <th>Tác Giả</th>  
                                <th>	<span class="glyphicon glyphicon-wrench ">&nbsp;</span>Edit</th>
                                <th><span class="glyphicon glyphicon-remove ">&nbsp;</span>Delete</th>
                              </tr>  
                            </thead>  
                            <tbody>  
                            <?php
                            		$i=1;
                            		$currentPage =$this->pages->getCurrentPageNumber();
                            		$itemPerPage =$this->pages->getItemCountPerPage();
                          
									foreach ($this->pages as $page){
										$index= $i+($currentPage-1)*$itemPerPage;
										echo "<tr>";
								 		echo "<td>".$index."</td>";
										echo "<td>".$page['title']."</td>";
									   echo "<td>".$page['time_create']."</td>";
									   echo "<td>".$page['username']."</td>";
									    echo  "<td><a href='".HOST_PATH.'admin/control/edit/id/'.$page['id']."' class='btn btn-info btn-sm' role='button'>Edit</a></td>";
										echo  "<td><a datalink=".HOST_PATH.'admin/control/delete/id/'.$page['id']." data-toggle='modal'  class='btn btn-danger btn-sm delete-button'>Delete</a></td>";
										echo "</tr>";
										$i++;
																			
									}
	 							
                            
                            ?>
                            </tbody> 
               </table>
				  <?php

      				 echo $this->paginationControl($this->pages, 'Sliding' , 'pagination.phtml');
     				
				?>